<script setup lang="ts">

import { computed } from 'vue'

const props = defineProps({
  prefix: {
    type: String,
    default: 'icon',
  },
  name: {
    type: String,
    required: true,
  },
  color: {
    type: String,
    default: '#333',
  },
  width: {
    type: String,
    default: '24px'
  },
  height: {
    type: String,
    default: '24px'
  },
})

const symbolId = computed(() => `#${props.prefix}-${props.name}`)
</script>

<template>
  <!--<svg style="width: 36px;height: 36px;">-->
  <!--  <use xlink:href="#icon-link" fill="#f40"></use>-->
  <!--</svg>-->

  <svg aria-hidden="true" :style="{width,height}">
    <use :href="symbolId" :fill="color" />
  </svg>
</template>

<style scoped lang="scss">

</style>
